package ar.com.unlp.fi.lrs.controller;

import java.util.List;

import javax.ws.rs.PathParam;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import ar.com.unlp.fi.lrs.domain.Verb;
import ar.com.unlp.fi.lrs.service.VerbService;


@RestController
@RequestMapping(value = "/verb/")
public class VerbController {
	
	@Autowired
	private VerbService verbService;// = new VerbService();

	@RequestMapping(value = "get/{idVerb}", method = RequestMethod.GET, headers = "Accept=application/json")
	public Verb get(@PathVariable("idVerb")  int idVerb){
		
		return verbService.get(idVerb);
	}
	
	@RequestMapping(value = "getAll", method = RequestMethod.GET, headers = "Accept=application/json")
	public List<Verb> getAll(){
		
		return verbService.getAll();
	}
	
}
